//
//  MainController.m
//  CHDropViewControllerExample
//
//  Created by hyc on 16/9/9.
//  Copyright © 2016年 hyc. All rights reserved.
//

#import "MainController.h"
#import "ViewController.h"
#import "ViewController1.h"

@interface MainController ()

@end

@implementation MainController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    // Uncomment the following line to preserve selection between presentations.
    // self.clearsSelectionOnViewWillAppear = NO;
    
    // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
    // self.navigationItem.rightBarButtonItem = self.editButtonItem;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 2;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    if (indexPath.row==0) {
        UIStoryboard *stroy = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
        ViewController *vc = [stroy instantiateViewControllerWithIdentifier:@"ViewController"];
        [self.navigationController pushViewController:vc animated:YES];
    }else if (indexPath.row==1){
        UIStoryboard *stroy = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
        ViewController1 *vc = [stroy instantiateViewControllerWithIdentifier:@"ViewController1"];
        [self.navigationController pushViewController:vc animated:YES];
    }else if (indexPath.row==2){
        
    }
}

@end
